//created by: Justina Lee

Ext.define("MajorProjectSenchaTouch.view.Main", {
    extend: 'Ext.tab.Panel',
    xtype: 'mainPage',
    requires: [
    'MajorProjectSenchaTouch.view.Home',
    'MajorProjectSenchaTouch.view.EResourcesModule.eResourcesMain',
    'MajorProjectSenchaTouch.view.More',
	// 'MajorProjectSenchaTouch.view.ExamPaperModule.ExamPapersLogin',
	// 'MajorProjectSenchaTouch.view.ExamPaperModule.ExamSearch',
    // 'MajorProjectSenchaTouch.view.ExamPapers',
    // 'MajorProjectSenchaTouch.view.MyAccount',
	// 'MajorProjectSenchaTouch.view.MyAccountModule.MyAccountLogin'
    ],
    id:'mainPanel',
    config: {        
        style: 'background-color: #343433',
        tabBar:{
            docked: 'bottom',
            layout:{
                pack: 'center'
            }
        },         
        items: [
            {xtype: 'homecard'},
            {xtype: 'eresourcesmain'},
			{
				iconCls : 'docs_black2',
				title: 'Exam Papers',
				listeners:[
                {
                    element: 'element',
                    event: 'painted',
                    fn: function() {
                        console.log('TAP!');
						var mainController = MajorProjectSenchaTouch.app.getController('Main');
                        mainController.checkSession();
                    }
                }
				]
			},
            {
				xtype: 'myaccountlogin',
				// iconCls : 'user',
				title: 'My Account'
				// listeners:[{
                    // element: 'element',
                    // event: 'painted',
                    // fn: function() {
                        // console.log('TAP!');
						// var mainController = MajorProjectSenchaTouch.app.getController('Main');
                        // mainController.checkAccSession();
                    // }
                // }]
				
			},
            {xtype: 'morecard'}
        ]
    },
});